cmake_minimum_required(VERSION 3.15)
project(bringup)

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  set(CMAKE_BUILD_TYPE Release)
endif()

set(CMAKE_CXX_STANDARD 17)

find_package(rclcpp REQUIRED)
find_package(rclpy REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(livox_ros_driver2 REQUIRED)

add_executable(livox_mid360 src/lidar/livox_mid360.cpp)
ament_target_dependencies(livox_mid360 livox_ros_driver2 rclcpp rclpy sensor_msgs)

install(
  DIRECTORY launch
  DESTINATION share/${PROJECT_NAME}/
)

install(
  DIRECTORY config
  DESTINATION share/${PROJECT_NAME}/
)

install(
  DIRECTORY rviz
  DESTINATION share/${PROJECT_NAME}/
)

install(
  TARGETS livox_mid360
  DESTINATION lib/${PROJECT_NAME}
)

ament_package()